sbp: A Scannerless Boolean Parser
نویسنده
چکیده
Scannerless generalized parsing techniques allow parsers to be derived directly from unified, declarative specifications. Unfortunately, in order to uniquely parse (disambiguate) existing programming languages, extensions beyond the usual contextfree formalism must be added to handle a number of specific cases. This paper describes sbp, a scannerless parser for boolean grammars, a superset of context-free grammars. In this expanded formalism, special-purpose disambiguation constructs become special cases of a broader formalism, yet all grammars admit O(n3) parsers using a derivitave of the Lang-Tomita algorithm. The implementation is publicly available as Java source code.
منابع مشابه
Scannerless Boolean Parsing
Scannerless generalized parsing techniques allow parsers to be derived directly from unified, declarative specifications. Unfortunately, in order to uniquely parse existing programming languages at the character level, disambiguation extensions beyond the usual context-free formalism are required. This paper explains how scannerless parsers for boolean grammars (context-free grammars extended w...
متن کاملUniversity of Amsterdam Programming Research Group Scannerless Generalized-LR Parsing
for useful suggestions and comments on previous versions of this paper. Incremental parser generation and context-sensitive disambiguation: a multidisciplinary perspective.
متن کاملPractical Dynamic Grammars for Dynamic Languages
Grammars for programming languages are traditionally specified statically. They are hard to compose and reuse due to ambiguities that inevitably arise. PetitParser combines ideas from scannerless parsing, parser combinators, parsing expression grammars and packrat parsers to model grammars and parsers as objects that can be reconfigured dynamically. Through examples and benchmarks we demonstrat...
متن کاملDeclarative, Formal, and Extensible Syntax Definition for AspectJ A Case for Scannerless Generalized-LR Parsing
Aspect-Oriented Programming (AOP) is attracting attention from both research and industry, as illustrated by the ever-growing popularity of AspectJ, the de facto standard AOP extension of Java. From a compiler construction perspective, AspectJ is interesting as it is a typical example of a compositional language, i.e. a language composed of a number of separate languages with different syntacti...
متن کاملDisambiguation Filters for Scannerless Generalized LR Parsers
Several real-world problems call for more parsing power than is offered by the widely used and well-established deterministic parsing techniques. These techniques also create an artificial divide between lexical and context-free analysis phases, at the cost of significant complexity at their interface. In this paper we present the fusion of generalized LR parsing and scannerless parsing. This c...
متن کامل